<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        //函数参数默认值
        function f(a,b=2) {
            return a+b
        }

        console.log(f(4))
        console.log(f(4,9))

        //不定长参数
        function f1(...value) {
            console.log(value.length)
        }

        f1(1,2,3)
    </script>
</head>
<body>

</body>
</html>